const router = require("koa-router")();
const MembersModel = require("../../models/Members");
router.post("/api/next",async ctx=>{
    var {id} = ctx.request.body;
    var data = await MembersModel.find({});
    console.log(ctx.request.body);
    var index = data.findIndex(item=>item._id == id);
    console.log(index);
    var obj = data[index+1];
    ctx.body = {
        code:200,
        res:obj,
        msg:"下一条数据"
    }
})
module.exports = router;